//
//  MarketDetailHeadView.m
//  RedManStock
//
//  Created by lanou3g on 15/8/1.
//  Copyright (c) 2015年 lanou3g. All rights reserved.
//

#import "MarketDetailHeadView.h"
#import "ParameterHeader.h"
@implementation MarketDetailHeadView

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/


-(void)setMarketDeatil:(MarketDetail *)marketDeatil{
    if (_marketDeatil != marketDeatil) {
        
        _marketDeatil = marketDeatil;
    }
    
    self.nowPriceLabel.text = marketDeatil.nowPriceSB;
    self.updownLabel.text = marketDeatil.updownSB;
    self.updownRateLabel.text = marketDeatil.updownRateSB;
    self.hightLabel.text = marketDeatil.highSB;
    self.openLabel.text = marketDeatil.openSB;
    self.lowLabel.text = marketDeatil.lowSB;
    self.closeLabel.text = marketDeatil.closeSB;
    self.volumeLabel.text = marketDeatil.volumeSB;
    self.upNumLabel.text = marketDeatil.upNumSB;
    self.downNumLabel.text = marketDeatil.downNumSB;
    self.flatNumLabel.text = marketDeatil.floatNumSB;
    self.post_id = marketDeatil.post_idSB;
    
    CGFloat a =  [self.updownLabel.text floatValue];
    
    if (a >0 ) {
        
        self.backgroundColor = MyRedColor;
    }else{
        self.backgroundColor = MyGreenColor;
    }
    
    
    
}



@end
